package com.baosight.risk.service.xtzy.entity;

import javax.persistence.*;

import com.baosight.risk.base.entity.BaseEntity;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Table: T_XTZY_COMPANY
 */
@Data
@Table(name = "T_XTZY_COMPANY")
public class XtzyCompany extends BaseEntity {

    /**
     * 组织编码
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_CODE
     * Nullable:  false
     */
    @Column(name = "COMP_CODE")
    private String compCode;

    /**
     * 组织名称
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_NAME
     * Nullable:  false
     */
    @Column(name = "COMP_NAME")
    private String compName;

    /**
     * 组织机构中文全称
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_NAME_S
     * Nullable:  true
     */
    @Column(name = "COMP_NAME_S")
    private String compNameS;

    /**
     * 组织机构中文简称
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_NAME_L
     * Nullable:  true
     */
    @Column(name = "COMP_NAME_L")
    private String compNameL;

    /**
     * 组织机构英文
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_NAME_EN
     * Nullable:  true
     */
    @Column(name = "COMP_NAME_EN")
    private String compNameEn;

    /**
     * 上级ID
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    PARENT_GUID
     * Nullable:  false
     */
    @Column(name = "PARENT_GUID")
    private String parentGuid;

    /**
     * 层级
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    PATH_LEVEL
     * Nullable:  true
     */
    @Column(name = "PATH_LEVEL")
    private Short pathLevel;

    /**
     * 是否末级
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    END_LEVEL_FLAG
     * Nullable:  true
     */
    @Column(name = "END_LEVEL_FLAG")
    private Short endLevelFlag;

    /**
     * 路径
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    PATH_CODE
     * Nullable:  true
     */
    @Column(name = "PATH_CODE")
    private String pathCode;

    /**
     * 组织机构名称全称
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    PATH_NAME
     * Nullable:  true
     */
    @Column(name = "PATH_NAME")
    private String pathName;

    /**
     * 组织类型（COMP_TYPE 1-公司4-部门；5-科室）
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_TYPE
     * Nullable:  true
     */
    @Column(name = "COMP_TYPE")
    private String compType;

    /**
     * 组织类型说明
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_TYPE_NAME
     * Nullable:  true
     */
    @Column(name = "COMP_TYPE_NAME")
    private String compTypeName;

    /**
     * 业务板块
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_PLATE
     * Nullable:  true
     */
    @Column(name = "COMP_PLATE")
    private String compPlate;

    /**
     * 业务板块说明
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    COMP_PLATE_NAME
     * Nullable:  true
     */
    @Column(name = "COMP_PLATE_NAME")
    private String compPlateName;

    /**
     * 行业
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    INDUSTRY
     * Nullable:  true
     */
    @Column(name = "INDUSTRY")
    private String industry;

    /**
     * 行业说明
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    INDUSTRY_NAME
     * Nullable:  true
     */
    @Column(name = "INDUSTRY_NAME")
    private String industryName;

    /**
     * 人力资源系统组织码
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    EHR_CODE
     * Nullable:  true
     */
    @Column(name = "EHR_CODE")
    private String ehrCode;

    /**
     * 管理类型（直接管理、委托管理、受托管理）
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    MANAGE_TYPE
     * Nullable:  true
     */
    @Column(name = "MANAGE_TYPE")
    private String manageType;

    /**
     * 管理类型说明
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    MANAGE_TYPE_NAME
     * Nullable:  true
     */
    @Column(name = "MANAGE_TYPE_NAME")
    private String manageTypeName;

    /**
     * Table:     T_XTZY_COMPANY
     * Column:    FROM_DATE
     * Nullable:  true
     */
    @Column(name = "FROM_DATE")
    private Date fromDate;

    /**
     * Table:     T_XTZY_COMPANY
     * Column:    TO_DATE
     * Nullable:  true
     */
    @Column(name = "TO_DATE")
    private Date toDate;

    /**
     * 状态（10-正常；20-停用）
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    STATUS
     * Nullable:  true
     */
    @Column(name = "STATUS")
    private String status;

    /**
     * 备注
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    REMARK
     * Nullable:  true
     */
    @Column(name = "REMARK")
    private String remark;

    /**
     * 排序
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    ROW_ORDER
     * Nullable:  true
     */
    @Column(name = "ROW_ORDER")
    private String rowOrder;
    /**
     * 风险识别标识
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    RISK_FLAG
     * Nullable:  true
     */
    @Column(name = "RISK_FLAG")
    private String riskFlag;

    /**
     * 上级组织名称
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    PARENT_NAME
     * Nullable:  true
     */
    @Column(name = "PARENT_NAME")
    private String parentName;


    /**
     * 部门类别
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    DEPARTMENT_CLASS
     * Nullable:  true
     */
    @Column(name = "DEPARTMENT_CLASS")
    private String departmentClass;


    /**
     * 部门类别名称
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    DEPARTMENT_CLASS_NAME
     * Nullable:  true
     */
    @Column(name = "DEPARTMENT_CLASS_NAME")
    private String departmentClassName;
    
    /**
     * 管理单位标识（Y-是 N-否)
     * <p>
     * Table:     T_XTZY_COMPANY
     * Column:    MANAGE_FLAG
     * Nullable:  true
     */
    @Column(name = "MANAGE_FLAG")
    private String manageFlag;

    /**
     * 子组织
     */
    private List<XtzyCompany> children = new ArrayList<>();


    private static final long serialVersionUID = 1L;
}